<ui:component xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:c2="http://java.sun.com/jstl/core">


<a4j:outputPanel id="pnlWizard" rendered="true">

<rich:panel id="wizard" rendered="true" >
	
	<c2:forEach var="wizard" items="#{wizards.items}">

			<c2:if test="#{wizards.estatWizards[wizard.id - 1]}">
			<f:facet name="header">
			
				<h:panelGroup>
					<table>
					<tr>
						<td>
							<h:outputText value="#{wizard.titol}"/>
						</td>
						<td align="right">
							<h:graphicImage  value="images/delete_enabled.gif" style="cursor:pointer" id="hidelink_33" onclick="hideDivToggle();"/>
							<rich:effect name="hideDivToggle" for="wizard"  type="DropOut" params="delay:1.5,duration:1" />
							<rich:effect name="showDivToggle"   for="efecte1"  type="Appear" params="delay:1.5,duration:2.5" />
						</td>
					</tr>
					</table>
				</h:panelGroup>
			</f:facet>
					
			</c2:if>
		
	     	
	     	<rich:togglePanel id="tg#{wizard.id}" switchType="client" stateOrder="tip0#{wizard.id}, tip1#{wizard.id},tip2#{wizard.id}" rendered="#{wizards.estatWizards[wizard.id - 1]}">
		     	
		     			<f:facet name="tip0#{wizard.id}">
		     			 
			     				<ui:include src="#{wizard.jsps[0].url}" />
	                       		<rich:toggleControl for="tg#{wizard.id}" value="nefxt" switchToState="tip1#{wizard.id}" styleClass="enllac"/>	
	                     			     			
				   	 	</f:facet>   

		     		
		     			 <f:facet name="tip2#{wizard.id}">
		     			 
		     				 <h:panelGroup>
		     			 	
		     			 		<ui:include src="#{wizard.jsps[2].url}" />
			     			
                        		<rich:toggleControl for="tg#{wizard.id}" value="previous" switchToState="tip1#{wizard.id}" styleClass="enllac"/>
		     			 
							</h:panelGroup>		     			 
		     			 
				     	</f:facet>
		     		
		     		
		     			<f:facet name="tip1#{wizard.id}">
		     			 	
							<h:panelGrid  styleClass=""  cellpadding="10" cellspacing="0" columnClasses="col" rowClasses="row1, row2,row3" border="0" columns="1">
								<ui:include src="#{wizard.jsps[1].url}" />
								<h:panelGroup>
			
								<table cellspacing="5">
									<tr>
										<td>
								            <rich:toggleControl for="tg#{wizard.id}" value="previous" switchToState="tip0#{wizard.id}" styleClass="enllac"/>
				                	    </td>
				                    	<td>
			    	                		<rich:toggleControl for="tg#{wizard.id}" value="next" switchToState="tip2#{wizard.id}" styleClass="enllac"/>
			    	                	</td>
			    	                </tr>
			    	             </table>
	                        
                    	    	</h:panelGroup>
                        	</h:panelGrid>
		     		    	
				     	</f:facet>
				     	
			</rich:togglePanel>
		     
 		</c2:forEach>    
 	
</rich:panel>


</a4j:outputPanel>



</ui:component>

			



			
